home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 24 / AMIGAplus Sonderheft 24 (2000)(Falke)(DE)[!].iso / Updates / Librarys / G5Library / Doku / GatewayLibraryENG.readme < prev    next >
Text File  |  1999-10-20  |  14KB  |  622 lines

  1. Sorry, a full english version of the guide not exists.
  2. My english isn't good enough to create a guide or doc.
  3.  
  4. But I will do this shot readme to give a litte help and hope
  5. you understand it:
  6.  
  7. At first, a lot of backgroundinformation's are in the german document.
  8. A typical copyright with full permission to use. The archive must been
  9. original if you give the archive to another person. Commercial use is
  10. forbidden.
  11. And, a very importand information: Gateway-5 is a BBS-Programm, based
  12. on Gateway-IV and so on. The first program only called Gateway. For over
  13. 10 Years! Now, the owner of the Amiga call Gateway, too. But, my program
  14. and "Gateway 2000" have only the same name, not more!
  15.  
  16.  
  17. The functions in this library are created in the last 10 years. For
  18. different programs and differnt usage. So the names of the variables
  19. are very differnt.
  20. All functions are everytime backward compatible. And so the one or
  21. another is not perfect or locks very fine. But, all functions work
  22. correct and the functions that use they often long time not changed.
  23. The program was written on Aztec-C in the past and as I changed the old
  24. compiler to vbcc there are not all functions available. Functions that
  25. be used in gateway or gateway-tools an missed on vbcc are rebuild and
  26. all that functions includes in this library. Only the functions that
  27. use directly DOS-functions are in an external link-library (like unlink).
  28.  
  29.  
  30. The library.functions:
  31. __________________________________________________________________________
  32.  
  33. ULONG GateRequest(UBYTE *title_d1,UBYTE *body,UBYTE *gadgets);
  34.  
  35. Testfunction, work the library? Link to EasyRequest.
  36.  
  37. in:
  38. ---
  39. UBYTE *title_d1  - headline requester
  40. UBYTE *body      - body of requester
  41. UBYTE *gadgets   - text for gadgets
  42.  
  43.  
  44. back:
  45. -----
  46. ULONG            - the gadgetnumber
  47.  
  48. __________________________________________________________________________
  49.  
  50. char *ltofa(char *tx_d1,ULONG l);
  51.  
  52. (Long TO formatted ascii)
  53.  
  54. Function to format a ULONG like this:
  55.  
  56. 1234567890 => '1.234.567.890'
  57. 482        => '          482'
  58. 48526      => '       48.526'
  59.  
  60.  
  61. in:
  62. ---
  63. char  *tx_d1      - pointer to string (min. 14 chars)
  64. ULONG  l          - the ulong to format
  65.  
  66.  
  67. back:
  68. -----
  69. char  *           - pointer to tx_d1
  70.  
  71. __________________________________________________________________________
  72.  
  73. void trim(UBYTE *trptr);
  74.  
  75. strip all blank's left and right on the string.
  76.  
  77. in:
  78. ---
  79. UBYTE  *trtpr     - string to be cleared
  80.  
  81.  
  82. back:
  83. -----
  84. N/A
  85.  
  86. __________________________________________________________________________
  87.  
  88. void trim_cr(UBYTE *trptr);
  89.  
  90. strip all blank's, CTRL-n, CR and LF left and right on the string.
  91.  
  92. in:
  93. ---
  94. UBYTE  *trtpr     - string to be cleared
  95.  
  96.  
  97. back:
  98. -----
  99. N/A
  100.  
  101. __________________________________________________________________________
  102.  
  103. void rtrim(UBYTE *trptr);" @{uu}@{LINDENT 6}
  104.  
  105. same as trim, but clear only the right side of the string.
  106.  
  107. in:
  108. ---
  109. UBYTE  *trtpr     - Pointer auf den String der bereinigt wird. Nach dem Funktionsaufruf ist der String bereinigt.
  110.  
  111.  
  112. back:
  113. -----
  114. N/A
  115.  
  116. __________________________________________________________________________
  117.  
  118. void lset(UBYTE *lbuff, int slen);
  119.  
  120. format a string to slen-chars.
  121. if the string is smaller: fill at left side with spaces.
  122. if the string is greater: cut right side
  123.  
  124. in:
  125. ---
  126. UBYTE  *lbuff    - pointer to string
  127. int     slen     - len the string have on return
  128.  
  129.  
  130. back:
  131. -----
  132. N/A
  133.  
  134. __________________________________________________________________________
  135.  
  136. void lsetmin(UBYTE *lbuff, int slen);
  137.  
  138. same as lset, but fill only the string, don't cut!
  139.  
  140. in:
  141. ---
  142. UBYTE  *lbuff    - pointer to string
  143. int     slen     - minimal len of string
  144.  
  145.  
  146. back:
  147. -----
  148. N/A
  149.  
  150. __________________________________________________________________________
  151.  
  152. void string(UBYTE *spstr, int num, int ch);
  153.  
  154. fill string *spstr with character ch at a len of num bytes.
  155.  
  156. in:
  157. ---
  158. UBYTE  *spstr    - pointer of string to be filled
  159. int     num      - len of string to be filled
  160. int     ch       - the character that will be used to fill
  161.  
  162.  
  163. back:
  164. -----
  165. N/A
  166.  
  167. __________________________________________________________________________
  168.  
  169. int instr(UBYTE *sa, UBYTE *sb);
  170.  
  171. search sb in sa and give back the position where sb found in sa.
  172. The position is 0 upto strlen(sa)-strlen(sb).
  173. -1 if not found.
  174. The case of the chars is not relevant (both strings will test uppercase or
  175. lowercase). The function do that for german chars, also ä, ö and ü will
  176. same as Ä, Ö and Ü.
  177.  
  178. in:
  179. ---
  180. UBYTE  *sa       - big string to search on
  181. UBYTE  *sb       - the searched string
  182.  
  183.  
  184. back:
  185. -----
  186. int              - positionwhre sb found or -1 if not
  187.  
  188. __________________________________________________________________________
  189.  
  190. int instr_pat(UBYTE *sa, UBYTE *sb);
  191.  
  192. same as instr but also pattern matching. * for any string and ? for any
  193. character.
  194.  
  195. in:
  196. ---
  197. UBYTE  *sa       - big string to search on
  198. UBYTE  *sb       - the searched string
  199.  
  200.  
  201. back:
  202. -----
  203. int              - positionwhre sb found or -1 if not
  204.  
  205. __________________________________________________________________________
  206.  
  207. void upstr(UBYTE *trptr);
  208.  
  209. make string uppercase including ä -> Ä, ö -> Ö and ü -> Ü
  210.  
  211. in:
  212. ---
  213. UBYTE  *trptr   - pointer to string
  214.  
  215.  
  216. back:
  217. -----
  218. N/A
  219.  
  220. __________________________________________________________________________
  221.  
  222. void lowstr(UBYTE *trptr);
  223.  
  224. make string lowercase including Ä -> ä, Ö -> ö and Ü -> ü
  225.  
  226. in:
  227. ---
  228. UBYTE  *trptr   - pointer to string
  229.  
  230. back:
  231. -----
  232. N/A
  233.  
  234. __________________________________________________________________________
  235.  
  236. void set(UBYTE *lbuff, int slen);
  237.  
  238. string will be return with len = slen.
  239. if the string is longer than slen, it will be cut
  240. if the string is to short blanks will be add at the end of string
  241.  
  242.  
  243. in:
  244. ---
  245. UBYTE  *lbuff   - pointer to string
  246. int     slen    - len for the string when returns
  247.  
  248.  
  249. back:
  250. -----
  251. N/A
  252.  
  253. __________________________________________________________________________
  254.  
  255. void midstr(UBYTE *mstr, int pos, long laenge);
  256.  
  257. cut a part (substring) from the string.
  258. pos is the beginning position ( 0-(strlen-1) ) and laenge means how many
  259. bytes will be cut. laenge=-1 means, from pos to end of string.
  260.  
  261.  
  262. in:
  263. ---
  264. UBYTE  *mstr    - pointer of string
  265. int     pos     - begin of substring
  266. int     laenge  - len for the substring or -1
  267.  
  268.  
  269. back:
  270. -----
  271. N/A
  272. __________________________________________________________________________
  273.  
  274. ULONG date_to_day(ULONG date);
  275.  
  276. Give the day in the year (1-365) for 'date'.
  277. This function isn't exact, it will only +/- 2 day's near the right,
  278. because it is only used for a cruncherfunction in the bbs-system that
  279. killed to old things.
  280.  
  281.  
  282.  
  283. in:
  284. ---
  285. ULONG date      - Date as ULONG in format ttmmjjjj
  286.  
  287.  
  288. back:
  289. -----
  290. ULONG           - day in year (1-365 +/-2 days)
  291.  
  292. __________________________________________________________________________
  293.  
  294. ULONG date_to_zahl(UBYTE *da);
  295.  
  296. Date from string to ULONG.
  297. Stringformat = TT.MM.JJJJ
  298. ULONG        = TTMMJJJJ
  299.  
  300.  
  301. in:
  302. ---
  303. UBYTE *da       - Date in format tt.mm.jjjj (the points can be any char)
  304.                   example: tt-mm-jjjj is also correct
  305.  
  306.  
  307. back:
  308. -----
  309. ULONG           - Date as ULONG=ttmmjjjj
  310.  
  311. __________________________________________________________________________
  312.  
  313. ULONG time_to_zahl(UBYTE *ti);
  314.  
  315. Time from string to ULONG
  316. A time in form SS:mm:ss will be returned as ULONG.
  317. The returned time can betwen 1 and 6 digits
  318. 00:00:07 = one, 10:10:05 = six
  319.  
  320.  
  321. in:
  322. ---
  323. UBYTE  *ti      - Time in SS:mm:ss (: can by any char)
  324.                   example: SS/mm/ss is also correct
  325.  
  326.  
  327. back:
  328. -----
  329. ULONG           - time as ULONG=SSmmss
  330.  
  331. __________________________________________________________________________
  332.  
  333. void kill_ansi(UBYTE *buffer);
  334.  
  335. delete most ansi-sequences from a string. Because this finction only need
  336. to delete cursor-functions and colors it search a character as end for a
  337. ansi-sequence. ansi-codes that end with special-characters are cut to
  338. many chars.
  339.  
  340.  
  341. in:
  342. ---
  343. UBYTE  *buffer  - pointer of string
  344.  
  345.  
  346. back:
  347. -----
  348. N/A
  349.  
  350. @ENDNODE
  351.  
  352. @NODE "newer" "newer"
  353. @{LINDENT 3}
  354. BOOL newer(UBYTE *d1, UBYTE *t1, UBYTE *d2, UBYTE *t2);
  355.  
  356. Is date d1 and time t1 NEWER than date d2 and time t2
  357.  
  358.  
  359. in:
  360. ---
  361. UBYTE  *d1     - 1. date in format tt.mm.jjjj
  362. UBYTE  *t1     - 1. time in format SS:mm:ss
  363. UBYTE  *d2     - 2. date in format tt.mm.jjjj
  364. UBYTE  *t2     - 2. time in format SS:mm:ss
  365.  
  366.  
  367. back:
  368.